<template>
<div id="app">
  <div class="container">
    <category title = '食物' :listData='foods'>
      <template v-slot:center>
        <img src="https://s3.ax1x.com/2021/01/16/srJlq0.jpg" alt="">
      </template>
      <template v-slot:footer>
        <a  href="http://www.baidu.com">更多美食</a>
      </template>
    </category>
    <category title = '游戏' :listData='games'>
      <template v-slot:center>
        <ul>
          <li v-for="(game,index) in games" :key = 'index'>{{ game }}</li>
        </ul>
      </template>
      <template v-slot:footer>
        <a href="http://www.baidu.com">单机游戏</a>&nbsp;
        <a href="http://www.baidu.com">网络游戏</a>
      </template>
    </category>
    <category title = '电影' :listData='films'>
      <template v-slot:center>
        <video controls src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
      </template>
      <template v-slot:footer>
        <a href="http://www.baidu.com">经典</a>&nbsp;
        <a href="http://www.baidu.com">热门</a>&nbsp;
        <a href="http://www.baidu.com">推荐</a>&nbsp;
      </template>
    </category>
  </div>
</div>
</template>
<script>
import Category from './components/Category.vue';
    export default {
        name: 'App',
        data(){
          return {
            foods:['火锅','烧烤','小龙虾','牛排'],
            games:['红色警戒','魔兽世界','LOL','赛尔号'],
            films:['教父','IT狂人','布莱克书店','九号秘事']
          }
        },
        setup(){
          
        },
        components:{
          Category
        },

        methods:{ 
         
        },
    }
</script>
<style scoped>
  .container{
      display: flex;
      justify-content: space-around;
  }
  img{
    width: 100%
  }
  video{
    width: 100%
  }
</style>
